{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named '_k2'",
     "output_type": "error",
     "traceback": [
      "\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
      "\u001B[1;31mModuleNotFoundError\u001B[0m                       Traceback (most recent call last)",
      "Cell \u001B[1;32mIn[1], line 1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m \u001B[38;5;28;01mimport\u001B[39;00m \u001B[38;5;21;01mk2\u001B[39;00m\n\u001B[0;32m      2\u001B[0m s \u001B[38;5;241m=\u001B[39m \u001B[38;5;124m'''\u001B[39m\n\u001B[0;32m      3\u001B[0m \u001B[38;5;124m0 1 10 0.1\u001B[39m\n\u001B[0;32m      4\u001B[0m \u001B[38;5;124m1 2 -1 0.2\u001B[39m\n\u001B[0;32m      5\u001B[0m \u001B[38;5;124m2\u001B[39m\n\u001B[0;32m      6\u001B[0m \u001B[38;5;124m'''\u001B[39m\n\u001B[0;32m      7\u001B[0m fsa \u001B[38;5;241m=\u001B[39m k2\u001B[38;5;241m.\u001B[39mFsa\u001B[38;5;241m.\u001B[39mfrom_str(s)\n",
      "File \u001B[1;32m~\\AppData\\Roaming\\Python\\Python310\\site-packages\\k2\\__init__.py:1\u001B[0m\n\u001B[1;32m----> 1\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01marray\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m Array\n\u001B[0;32m      2\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mfsa\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m Fsa\n\u001B[0;32m      3\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01msymbol_table\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m SymbolTable\n",
      "File \u001B[1;32m~\\AppData\\Roaming\\Python\\Python310\\site-packages\\k2\\array.py:9\u001B[0m\n\u001B[0;32m      5\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01mtyping\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m Union\n\u001B[0;32m      7\u001B[0m \u001B[38;5;28;01mimport\u001B[39;00m \u001B[38;5;21;01mtorch\u001B[39;00m\n\u001B[1;32m----> 9\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01m_k2\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m _ArcArray1\n\u001B[0;32m     10\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01m_k2\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m _FloatArray1\n\u001B[0;32m     11\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01m_k2\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m _FloatArray2\n",
      "\u001B[1;31mModuleNotFoundError\u001B[0m: No module named '_k2'"
     ]
    }
   ],
   "source": [
    "import k2\n",
    "s = '''\n",
    "0 1 10 0.1\n",
    "1 2 -1 0.2\n",
    "2\n",
    "'''\n",
    "fsa = k2.Fsa.from_str(s)\n",
    "fsa.draw('simple_fsa.svg')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "nihao\n"
     ]
    }
   ],
   "source": [
    "print('nihao')"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "is_executing": true
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
